function return_data = svm_classify(data,w,class)

    c_ind = find(data(:,5)==class);
    nc_ind = find(~(data(:,5)==class));
    
    y = sum(repmat(w,size(data(c_ind,1),1),1).*data(c_ind,6:end),2);
    a = sum(repmat(w,size(data(nc_ind,1),1),1).*data(nc_ind,6:end),2);
    
    correct_data = data(c_ind(y>0),1:3);
    correct_data = [correct_data;data(nc_ind(a<0),1:3)];
    
    false_data = data(c_ind(y<0),1:3);
    false_data = [false_data;data(nc_ind(a>0),1:3)];
    
    return_data = [correct_data,repmat([1,1,1],size(correct_data,1),1)];
    return_data = [return_data;[false_data,repmat([0,0,1],size(false_data,1),1)]];   
    figure
    plot(y,'b.')
    hold on
    plot(a,'r.')
    
 end